<?php
/**
 * Created by PhpStorm.
 * User: xuewl
 * Date: 2018/1/3
 * Time: 17:21
 */

namespace app\goods\model;
use \app\common\library\Model;

class GoodsStock extends Model
{
    protected $type = [
        'attrs' => 'json',
    ];

    public function GoodsOrderCreateInfo() {
        return $this->hasOne("app\\goods\\model\\GoodsStockTicket", 'stock_id', 'id')
            ->where('status', '=', 1)
            ->where('use_uid', '=', 0)
            ->field(true);
    }

    public function StockTicketInfo() {
        return $this->hasOne("app\\goods\\model\\GoodsStockTicket", 'stock_id', 'id');
    }



}
